home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Tools⁄Additions / InsideBa1994 / InsideBasic-94 / IB 94 / Standard Files Tricks / Standard Files Tricks.BAS next >
BASIC Source File  |  1994-01-25  |  945b  |  39 lines

  1.  
  2. '---------------------------------
  3. ' Standard Files Tricks
  4. ' by Ross W. Lambert
  5. ' January, 1993 Inside Basic
  6. ' Copyright © 1993
  7. ' All Source Code Rights Reserved
  8. '---------------------------------
  9.  
  10. ' The gussied up Standard Files dialogs are in the resource fork.
  11. RESOURCES "Standard Files Tricks.Res"
  12.  
  13. ' Let's look at our custom resources...
  14.  
  15. t$ = "Some custom Standard Files dialogs!"
  16. CALL PARAMTEXT (t$,"","","")
  17. fName$ = FILES$(_fOpen,"",,vRef)
  18. fName$ = FILES$(_fSave,"","Test File",vRef)
  19.  
  20. ' Now change a button title...
  21. ' Incidentally, this last technique does NOT work with
  22. ' Norton Utilities' Directory Assistance - it changes the
  23. ' button titles on its own.
  24.  
  25. t$ = "Select a file to delete."
  26. CALL PARAMTEXT (t$,"","","")
  27. LONG IF SYSTEM(_sysVers) => 700
  28.   dlog = _SFgetDialogID
  29. XELSE
  30.   dlog = _getDlgID
  31. END IF
  32. h& = FN GETRESOURCE(_"DITL",dlog)
  33. LONG IF h&
  34.   t$ = "Delete"
  35.   BLOCKMOVE @t$,[h&]+15,7
  36. END IF
  37. fName$ = FILES$(_fOpen,"",,vRef)
  38.  
  39.